package com.meringer.entities;

import java.io.Serializable;
import java.lang.String;
import java.util.List;

import javax.persistence.*;

/**
 * Entity implementation class for Entity: Role
 *
 */
@Entity
@Table(name="T_ROLES")

public class Role implements Serializable
{
	private static final long serialVersionUID = 1L;
	   
	@Id
	@Column(name="ROLE", nullable=false, length = 30)
	private String role;
	@Column(name="DESCRIPTION", nullable=false, length = 60)
	private String description;
	
	
	@ManyToMany(mappedBy="roles", cascade=CascadeType.ALL)
	private List<User> userList;
	
	public Role() {
		super();
	}
	
	public Role(String role, String description) {
		super();
		this.role = role;
		this.description = description;
	}
	
	public Role(String role, String description, List<User> userList) {
		super();
		this.role = role;
		this.description = description;
		this.userList = userList;
	}

	public String getRole() {
		return this.role;
	}

	public void setRole(String role) {
		this.role = role;
	}   
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
   
	public List<User> getUserList() {
		return userList;
	}

}
